package com.rayc.mall.common.exception;

import lombok.Getter;

/**
 * @Author: Ray-C
 * @CreateTime: 2025-03-23
 * @Description: 自定义业务异常
 * @Version: 1.0
 */
@Getter
public class BusinessException extends RuntimeException{
    private final int code;

    public BusinessException(String message, int code) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message, Throwable cause, int code) {
        super(message, cause);
        this.code = code;
    }

    public BusinessException(Throwable cause, int code) {
        super(cause);
        this.code = code;
    }
}
